<?php
/**
 * Created by PhpStorm.
 * User: zhaoye
 * Date: 2016/12/19
 * Time: 下午5:49
 */

return [
    'route'=>
    [

        'ANY' => [
            '/test' => function(){
                return 'hello';
            },
            '/api/Test/test' => '\Api\Test\test',
        ],

        'GET' => [
            /***************************公共***********************************/
            '/api/common/getToken' => '\Api\CCommon\getToken',//token
//            '/api/common/getToken' => '\Api\CCommon\下载图片或文件',//下载图片或文件

        ],

        'POST'  => [

            /***************************用户***********************************/
            '/api/member/reg' => '\Api\CMember\reg',//注册
            '/api/member/login' => '\Api\CMember\login',//login
            '/api/member/regs' => '\Api\CMember\regs',//批量注册
            '/api/member/resetPassword' => '\Api\CMember\resetPassword',//重置密码
            '/api/member/getUser' => '\Api\CMember\getUser',//获取单个用户
            '/api/member/getUsers' => '\Api\CMember\getUsers',//获取批量用户---分页(默认返回10个)
            '/api/member/deleteUser' => '\Api\CMember\deleteUser',//删除单个用户
            '/api/member/deleteUsers' => '\Api\CMember\deleteUsers',//删除批量用户
            '/api/member/editNickname' => '\Api\CMember\editNickname',//修改昵称
            '/api/member/addFriend' => '\Api\CMember\addFriend',//添加好友
            '/api/member/deleteFriend' => '\Api\CMember\deleteFriend',//删除好友
            '/api/member/showFriends' => '\Api\CMember\showFriends',//查看好友
            '/api/member/getBlacklist' => '\Api\CMember\getBlacklist',//查看黑名单
            '/api/member/addUserForBlacklist' => '\Api\CMember\addUserForBlacklist',//往黑名单中加人
            '/api/member/deleteUserFromBlacklist' => '\Api\CMember\deleteUserFromBlacklist',//从黑名单中减人
            '/api/member/isOnline' => '\Api\CMember\isOnline',//查看用户是否在线
            '/api/member/getOfflineMessages' => '\Api\CMember\getOfflineMessages',//查看用户离线消息数
            '/api/member/deactiveUser' => '\Api\CMember\deactiveUser',//禁用用户账号
            '/api/member/activeUser' => '\Api\CMember\activeUser',//解禁用户账号
            '/api/member/disconnectUser' => '\Api\CMember\disconnectUser',//强制用户下线

            /********************************群组*********************************/
            '/api/chatgroups/createGroup' => '\Api\CGroup\createGroup',//创建一个群组
            '/api/chatgroups/modifyGroupInfo' => '\Api\CGroup\modifyGroupInfo',//修改群组信息
            '/api/chatgroups/getGroupDetail' => '\Api\CGroup\getGroupDetail',//获取一个或多个群组的详情
            '/api/chatgroups/deleteGroup' => '\Api\CGroup\deleteGroup',//删除群组
            '/api/chatgroups/getGroups' => '\Api\CGroup\getGroups',//获取app中的所有群组--------分页(默认返回10个)
            '/api/chatgroups/getGroupUsers' => '\Api\CGroup\getGroupUsers',//获取群组中的成员
            '/api/chatgroups/addGroupMember' => '\Api\CGroup\addGroupMember',//群组单个加人
            '/api/chatgroups/addGroupMembers' => '\Api\CGroup\addGroupMembers',//群组批量加人
            '/api/chatgroups/deleteGroupMember' => '\Api\CGroup\deleteGroupMember',//群组单个减人
            '/api/chatgroups/deleteGroupMembers' => '\Api\CGroup\deleteGroupMembers',//群组批量减人
            '/api/chatgroups/getGroupsForUser' => '\Api\CGroup\getGroupsForUser',//获取一个用户参与的所有群组
            '/api/chatgroups/changeGroupOwner' => '\Api\CGroup\changeGroupOwner',//群组转让
            '/api/chatgroups/addGroupBlackMember' => '\Api\CGroup\addGroupBlackMember',//群组黑名单单个加人
            '/api/chatgroups/addGroupBlackMembers' => '\Api\CGroup\addGroupBlackMembers',//群组黑名单批量加人
            '/api/chatgroups/deleteGroupBlackMember' => '\Api\CGroup\deleteGroupBlackMember',//群组黑名单单个减人
            '/api/chatgroups/deleteGroupBlackMembers' => '\Api\CGroup\deleteGroupBlackMembers',//群组黑名单批量减人
            '/api/chatgroups/getGroupBlackList' => '\Api\CGroup\getGroupBlackList',//查询一个群组黑名单用户名列表

            /********************************聊天室*********************************/
            '/api/chatrooms/createRoom' => '\Api\CRoom\createRoom',//创建一个聊天室
            '/api/chatrooms/modifyRoomInfo' => '\Api\CRoom\modifyRoomInfo',//修改聊天室信息
            '/api/chatrooms/getRoomDetail' => '\Api\CRoom\getRoomDetail',//获取一个或多个聊天室的详情
            '/api/chatrooms/deleteRoom' => '\Api\CRoom\deleteRoom',//删除聊天室
            '/api/chatrooms/getRooms' => '\Api\CRoom\getRooms',//获取app中的所有聊天室--------分页(默认返回10个)
            '/api/chatrooms/getRoomUsers' => '\Api\CRoom\getRoomUsers',//获取聊天室中的成员
            '/api/chatrooms/addRoomMember' => '\Api\CRoom\addRoomMember',//聊天室单个加人
            '/api/chatrooms/addRoomMembers' => '\Api\CRoom\addRoomMembers',//聊天室批量加人
            '/api/chatrooms/deleteRoomMember' => '\Api\CRoom\deleteRoomMember',//聊天室单个减人
            '/api/chatrooms/deleteRoomMembers' => '\Api\CRoom\deleteRoomMembers',//聊天室批量减人
            '/api/chatrooms/getRoomsForUser' => '\Api\CRoom\getRoomsForUser',//获取一个用户参与的所有聊天室
            '/api/chatrooms/changeRoomOwner' => '\Api\CRoom\changeRoomOwner',//聊天室转让
            '/api/chatrooms/addRoomBlackMember' => '\Api\CRoom\addRoomBlackMember',//聊天室黑名单单个加人
            '/api/chatrooms/addRoomBlackMembers' => '\Api\CRoom\addRoomBlackMembers',//聊天室黑名单批量加人
            '/api/chatrooms/deleteRoomBlackMember' => '\Api\CRoom\deleteRoomBlackMember',//聊天室黑名单单个减人
            '/api/chatrooms/deleteRoomBlackMembers' => '\Api\CRoom\deleteRoomBlackMembers',//聊天室黑名单批量减人
            '/api/chatrooms/getRoomBlackList' => '\Api\CRoom\getRoomBlackList',//查询一个聊天室黑名单用户名列表


















        ],
//            '/Tests/{id}'=>function($id){
//                return \ZPHP\Core\App::model('test')->getUserByIds($id);
//            },
//        'ANY' => [
//            '/Test/{id}' => function($id){
//                return \ZPHP\Core\App::model('test')->getUserById($id);
//            },
//            '/Tests/{id}'=>function($id){
//                return \ZPHP\Core\App::model('test')->getUserByIds($id);
//            },
//        ],
//        'POST'  => [
//            '/testinfo/save' => '\index\testrout',
//        ],
//        'GET' => [
//            '/testtn/{time}/{name}' => function($name, $time){
//                $id = yield \ZPHP\Core\App::model('Test')->insert($time, $name);
//                return json_encode(['id'=>$id]);
//            }
//        ]

//       '/api/common/getShi2/{id}' => function($id){
//                return \ZPHP\Core\App::model('city')->getShiByProvinceId2($id);
//            },//市列表
    ],
];
